import request from '@/config/axios'

export interface AgentVO {
        id: number
        no: string
        status: number
        taskId: string
        expireTime: number
        expireAt: Date
}

// 查询机器人坐席列表
export const getAgentPage = async (params) => {
    return await request.get({url: `/robot/agent/page`, params})
}

// 查询机器人坐席详情
export const getAgent = async (id: number) => {
    return await request.get({url: `/robot/agent/get?id=` + id})
}

// 新增机器人坐席
export const createAgent = async (data: AgentVO) => {
    return await request.post({url: `/robot/agent/create`, data})
}

// 修改机器人坐席
export const updateAgent = async (data: AgentVO) => {
    return await request.put({url: `/robot/agent/update`, data})
}

// 删除机器人坐席
export const deleteAgent = async (id: number) => {
    return await request.delete({url: `/robot/agent/delete?id=` + id})
}

// 导出机器人坐席 Excel
export const exportAgent = async (params) => {
    return await request.download({url: `/robot/agent/export-excel`, params})
}